<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
     <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="RoleName" label="角色名称" />
      <el-table-column prop="Browers" label="浏览"  />
      <el-table-column prop="Edit" label="编辑" />
      <el-table-column fixed="right" label="Operations" width="120">
      <template #default="scope">
        <el-button
          type="text"
          size="small"
          @click.prevent="Edit(scope.row)"
        >
          编辑
        </el-button>
      </template>
    </el-table-column>
      <!-- <el-table-column  label="操作" >
        <template #default="action">
          <el-button type="text" size="small" @click="handleClick">Detail</el-button>
          <el-button type="text" size="small">Edit</el-button>
        </template>
      </el-table-column> -->
    </el-table>
  </div>
</template>

<script>

 import instance from "../Utils/Request";
export default {
  name: 'HelloWorld',
  props: {
     row: {
      type: Object,
      default: () => ({}),
    },
  },
  setup(props){
  console.log(props);

  },
  mounted:function(){
          instance.post("Home/Index", JSON.stringify(this.account)).then((res) => {
        
             if(res.data.code=="1")
               {
                  let  ShowData=[];
                  let result=res.data.data
                  for(let i=0;i<result.length;i++)
                  {
                    let obj={};
                    obj.Id=result[i].roleID;
                    obj.RoleName=result[i].roleName;
                    obj.Browers=result[i].browers;
                    obj.Edit=result[i].edit;
                    ShowData[i]=obj;
                  }
                 this.tableData=ShowData;
               //  this.GetlNotification(res.data.msg);
               }
          });
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
